class Car:
    __SN=0
    def __init__(self,mark,color,price,speed):
        Car.__SN+=1
        self.sn=str(Car.__SN).zfill(6)
        self.mark=mark
        self.color=color
        self.price=price
        self.speed=speed
    
    def showcar(self):
        return {self.sn:{'mark':self.mark,'color':self.color,'price':self.price,'speed':self.speed}}

        
car_system={}
c1=Car('BYD','black','30w','200km/h')
car_system.update(c1.showcar())

c2=Car('BMW','red','50w','220km/h')
car_system.update(c2.showcar())

c3=Car('Audi','gray','60w','240km/h')
car_system.update(c3.showcar())

print(car_system)


# showcar 这个方法，是不是可以提取到别的类里面呢
